﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Dummy
{
    public class GameService
    {
        private MainPage _mainpage = (Dummy.App.Current.RootVisual as MainPage);

        public void error(GameClientCallback callback, string msg)
        {
            string errormessage = msg;
        }

        public void errorcommand(GameClientCallback callback, string command)
        {

        }

        public void clienthi(GameClientCallback callback, string msg, int num)
        {
            string newdata = msg + " - " + num.ToString();
        }

        public void gamerconnected(GameClientCallback callback, string gamerName)
        {
            GameData.GamerConnected(gamerName);
        }

        public void gamerconnecterror(GameClientCallback callback, string error)
        {
            GameData.GamerConnectError(error);
        }

        public void getinvite(GameClientCallback callback, string competitorName)
        {
            GameData.GetInvite(competitorName);
        }

        public void sendinviteerror(GameClientCallback callback, string gamerName, string _error)
        {
            GameData.SendInviteError(gamerName, _error);
        }

        public void gamerlist(GameClientCallback callback, string[] gamerList)
        {
            GameData.UpdateGamerList(gamerList);
        }

        public void newgamercome(GameClientCallback callback, string newGamerName)
        {
            GameData.NewGamerCome(newGamerName);
        }

        public void startgame(GameClientCallback callback, string competitorGamerName, bool yourMove, string startWord)
        {
            GameData.StartGame(competitorGamerName, yourMove, startWord);
        }

        public void startgameerror(GameClientCallback callback, string gamerName, string _error)
        {
            GameData.StartGameError(gamerName, _error);
        }

        public void gamewordlist(GameClientCallback callback, bool isYourWords, string[] wordList)
        {
            GameData.GameWordList(isYourWords, wordList);
        }

        public void gamermakemove(GameClientCallback callback, bool isYourMove, int moveI, int moveJ, string IJchar, string word, 
            int yourscore, int competitorscore)
        {
            GameData.GamerMakeMove(isYourMove, moveI, moveJ, IJchar, word, yourscore, competitorscore);
        }

        public void gamermakemoveerror(GameClientCallback callback, string error)
        {
            GameData.GamerMakeMoveError(error);
        }
    }
}
